#
# Package.
#

package iSOCK::Controller::Specification::Acronyms;

#
# Parent.
#

use Moose;
use namespace::autoclean;

BEGIN { extends 'iSOCK::Controller::Root' }

#
# Uses.
#

use SOCK::CFG;

#
# Documentation.
#

=head1 NAME

iSOCK::Controller::Specification::Acronyms - Controller for iSOCK

=head1 DESCRIPTION

[enter your description here]

=head1 METHODS

=cut

#
# Subs.
#

sub index :Path :Args(0) {
  my ( $self, $c ) = @_;
  
  if ( my $acronyms = SOCK::CFG->new->acronyms ) {
    my @components = map { { id => $_ } } sort keys %{$acronyms->{component}};

    $c->stash ( acronyms => $acronyms, alt_navigation => ( scalar @components ? 1 : undef ), alt_navigation_title => 'Components', alt_navigation_items => \@components );
  }

  $c->forward ( qw( iSOCK::Controller::Root render_view ) );
}

#
# Documentation.
#

=head1 AUTHOR

Xavier Caron

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

#
# True.
#

1;
